# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：     ConfigHost.py
   Description :   
   Author :        ZhangYiLin
   date：          2020/12/07 15:07
-------------------------------------------------
   Change Activity:
                   2020/12/07 15:07
-------------------------------------------------
"""
import configparser
import os

PATH = os.path.split(os.path.realpath(__file__))[0]


class ConfHost:
    # host文件读取配置
    def __init__(self):
        config = configparser.ConfigParser()
        config.read(PATH+"/host.ini", encoding="utf-8")
        self.host = config["host"]

    def get_host_conf(self):
        return self.host

    def get_host(self):
        return self.host['test_platform']


if __name__ == "__main__":
    host = ConfHost()
    print(PATH)
    print(host.get_host())
    for i in host.get_host_conf():
        print(i)